package club.mrxiao.gps.service.impl;

import club.mrxiao.gps.dao.GpsDataMapper;
import club.mrxiao.gps.domain.TGpsData;
import club.mrxiao.gps.service.GpsDataService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

/**
 * gpsData相关接口
 * @author xiaoyu
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class GpsDataServiceImpl extends ServiceImpl<GpsDataMapper, TGpsData> implements GpsDataService {

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void saveGpsData(TGpsData tGpsData) {
        tGpsData.setCreateTime(new Date());
        this.save(tGpsData);
    }

    @Override
    public TGpsData findByImeiAndCreatTime(String imei, Date creatTime) {
        return null;
    }

}
